#-------------------------------------------------------------------------------
#
# Try to find OpenTissue, runtime libraries, and include paths.
# Once done this will define
#
# OPENTISSUE_FOUND        : System has OpenTissue and it can be used.
# OPENTISSUE_INCLUDE_DIRS : Directories need to find header-files used by OpenTissue and OpenTissue itself
# OPENTISSUE_LIBRARY_DIRS : Directories where the compiler can find static libraries of third-party software used by OpenTissue.
# OPENTISSUE_LIBS         : Full paths to all libraries of third-party software used by OpenTissue.
# OPENTISSUE_FLAGS        : OpenTissue compiler flags that should be used for any application using OpenTissue.
#
# Boost_unit_test_framework_LIBRARY : OpenTissue uses the Boost unit-test framework. This tells where the libs are for the linker
#

set(OPENTISSUE_VERSION @OpenTissue_VERSION@)

@PACKAGE_INIT@

if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo.cmake)
  include(${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo.cmake)
  list(INSERT CMAKE_MODULE_PATH 0 @PROJECT_SOURCE_DIR@/cmake)
  conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
  set(Boost_USE_STATIC_LIBS ON)
  find_package(Boost @OPENTISSUE_BOOST_VERSION@ COMPONENTS "@OPENTISSUE_BOOST_COMPONENTS@" REQUIRED)
  find_package(DevIL REQUIRED)
  find_package(TinyXML REQUIRED)
  find_package(TetGen REQUIRED)
  find_package(Triangle REQUIRED)
  find_package(Qhull REQUIRED)
endif()

check_required_components(OpenTissue)

include("${CMAKE_CURRENT_LIST_DIR}/OpenTissueTargets.cmake")
